<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <body>

        <ui:composition template="./template3.xhtml">
            <ui:define name="top">
                <h:form>
                    <h:graphicImage id="image" width="800" height="100"
                                    alt="DIUCS LOGO"
                                    url="https://cacdiucs.cpms.osd.mil/DIUCSPORTAL.gif">
                    </h:graphicImage> 
                </h:form>
            </ui:define>

            <ui:define name="left">

                <h:form>
                    <table>
                        <tr>
                            <ui:repeat var="vc" value="#{vocabularyController.vocabularyList}" varStatus="status">
                                <td> <h:commandLink action="#{vocabularyController.prepareView}" value="#{vc.word}"/> </td>
                            </ui:repeat>
                        </tr>
                    </table>
                </h:form>

                <hr/>

                <h:form>
                    <h:dataTable value="#{wordController.wordList}" var="wd">  
                        <h:column>
                            <h:commandLink action="#{wordController.prepareView}" value="#{wd.wordId}"/>
                        </h:column>
                        <h:column>
                            |||||||||||
                        </h:column>
                        <h:column>
                            <h:commandLink action="#{wordController.prepareView}" value="#{wd.word}"/>
                        </h:column>
                    </h:dataTable>
                </h:form>

                <hr/>

                <h:form>
                    <table>
                        <tr>
                            <ui:repeat var="vc" value="#{vocabularyController.vocabularyList}" varStatus="status">
                                <td> <h:commandLink action="#{vocabularyController.prepareView}" value="#{vc.word}"/> </td>
                            </ui:repeat>
                        </tr>
                    </table>
                </h:form>


            </ui:define>

            <ui:define name="content">
                <h:form>
                    <h1>#{vocabularyController.selected.word}</h1><br/><br/>
                    <h:inputTextarea id="definition" value="#{vocabularyController.selected.definition}"/>
                    <h:commandButton id="updateVocabulary" value="Update" action="#{vocabularyController.updateVocabulary}"/>"
                    <h1>#{wordController.selected.word}</h1>
                </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
